/**
 * related to listRowTemplate.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-07-15
 */
var root=ui("$");
var nf = sm("do_Notification");
var helperOpen = require("helper/open");
var helperOrder = require("helper/order");
var qqmath = require("util/qqmath");
var do_ALayout_order = ui("do_ALayout_order");
var do_ImageView_img = ui("do_ImageView_img");
var do_Label_title = ui("do_Label_title");
var do_Label_time = ui("do_Label_time");
var do_Label_orderStatus = ui("do_Label_orderStatus");
var do_Label_total = ui("do_Label_total");
var do_Label_buyer = ui("do_Label_buyer");
var labelOrderNo = ui("labelOrderNo");
//设置数据绑定的映射关系
root.setMapping({
	"labelOrderNo.tag" : "orderNo",
	"do_ImageView_img.source":"fullImg",
	"do_Label_title.text":"title",
	"do_Label_title.tag":"orderType",
	"do_Label_time.text":"strNewAt",
	"do_Label_time.tag":"sendDeliveryStatus",
	"do_Label_orderStatus.tag":"orderStatus",
	"do_Label_total.text":"total",
	"do_Label_buyer.text" :"buyerNick",
	"do_Label_orderStatus.text" : "strSendDeliveryStatus",
	"do_Label_buyer.tag" :"index",
	"sendDeliveryUserName.text" :"sendDeliveryUserName"
});

root.on("dataRefreshed", function(){
	labelOrderNo.text = "No."+labelOrderNo.tag;
	do_Label_total.text = "￥" + qqmath.getDight(do_Label_total.text,2);
});

do_ALayout_order.on("touch", function(data){
	var orderNo = labelOrderNo.tag;
	helperOpen.open("source://view/sendDelivery/orderDetail.ui", {orderNo : orderNo,index:do_Label_buyer.tag});
});

